/**
 * 
 */
package de.fhaugsburg.games.boardgames.scrabble.testing;

import de.fhaugsburg.games.boardgames.CircularList;
import de.fhaugsburg.games.boardgames.scrabble.*;
import junit.framework.TestCase;

/**
 * @author neo
 * 
 */
public class CircularListTest extends TestCase {
	public ScrabblePlayer spieler1;
	public ScrabblePlayer spieler2;
	public CircularList<ScrabblePlayer> list1;

	/*
	 * (non-Javadoc)
	 * 
	 * @see junit.framework.TestCase#setUp()
	 */
	protected void setUp() throws Exception {
		super.setUp();
		list1 = new CircularList<ScrabblePlayer>();
		spieler1 = new ScrabblePlayer("Hans");
		spieler2 = new ScrabblePlayer("Fritz");
		list1.add(spieler1);
		list1.add(spieler2);

	}

	/**
	 * Test method for
	 * {@link de.fhaugsburg.games.boardgames.CircularList#next()}
	 * .
	 */
	public void testNext() {
		
		
		assertEquals(list1.next(),(spieler2));
	}

	/**
	 * Test method for
	 * {@link de.fhaugsburg.games.boardgames.CircularList#prev()}
	 * .
	 */
	public void testPrev() {
		
		
		assertTrue(list1.prev().equals(spieler2));
	}

}
